package com.github.caijh.mall.category.service;

import java.util.HashMap;
import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.caijh.mall.category.model.Category;
import com.github.caijh.mall.category.request.CategoryReqBody;
import com.github.caijh.mall.category.request.CategorySearchReqBody;
import com.github.caijh.mall.category.vo.CategoryTreeVo;

public interface CategoryService extends IService<Category> {

    IPage<Category> findPage(CategorySearchReqBody request);

    int delete(Integer id);

    String getPathByPId(Integer pid);

    List<CategoryTreeVo> getTree(Integer type, Integer status, String name);

    List<CategoryTreeVo> getTree(Integer type, Integer status, List<Integer> categoryIdList);

    List<Category> getByIds(List<Integer> ids);

    HashMap<Integer, String> getListInId(List<Integer> cateIdList);

    boolean checkAuth(List<Integer> pathIdList, String uri);

    boolean update(CategoryReqBody request, Integer id);

    List<Category> getChildVoListByPid(Integer pid);

    int checkName(String name, Integer type);

    boolean checkUrl(String uri);

    boolean updateStatus(Integer id);

}
